<!DOCTYPE html>
<html class="x-admin-sm">

	{include file="public1/_header" /}
	<body class="index">
		<div class="x-nav">
			<span class="layui-breadcrumb">
				<a href="">首页</a>
				<a>
					<cite>课程表</cite></a>
			</span>
			<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()"
			 title="刷新">
				<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
			</a>
		</div>
		<div class="layui-fluid-ztree">
			<div class="ztree-btn"></div>
			<div class="ztree-table">
				<ul id="demoTree" data-id="0"></ul>
			</div>

		</div>
		<div class="layui-fluid-coontent">
			<iframe src="{:url('bancard/index/welcome')}" id="iframe-list" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
		</div>

		<script type="text/html" id="toolbarDemo">
			<div class="layui-btn-container">
				<button class="layui-btn layui-btn-sm" lay-event="getCheckData">
					 <i class="layui-icon">&#xe608;</i> 添加
				</button>
				<button class="layui-btn layui-btn-sm layui-btn-warm" lay-event="getCheckLength">
					<i class="layui-icon">&#xe642;</i>移动
				</button>
				<button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="isAll">
					<i class="layui-icon">&#xe640;</i>回收站
				</button>
			</div>
	</script>

		<script type="text/html" id="barDemo">
			<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
	  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
	</script>

		<script>
			function onClick(event, treeId, treeNode, clickFlag) {
				document.getElementById("iframe-list").src = "{:url('admin/Article/lists')}?id=" + treeNode.id + "&model_id=" +
					treeNode.model_id;
			}
			$(function() {
				layui.extend({
					dtree: 'dtree/dtree'
				}).use(['form', 'dtree', 'util'], function() {
					var form = layui.form;
					var $ = layui.jquery;
					var util = layui.util;
					var dtree = layui.dtree;
					// 初始化树
					var DemoTree = dtree.render({
						elem: "#demoTree",
						data: {$egetClass},
						menubar: false,
						checkbar: false,
						record: false,
						useIframe: true,  //启用iframe
						iframeElem: "#iframe-list",  // iframe的ID
						iframeUrl: "{:url('bancard/Schedule/timetable')}", // iframe路由到的地址
					});
					
					dtree.on("node(demoTree)", function(obj) {
						var nodeId = obj.param.nodeId;
					
						DemoTree.clickNodeCheckbar(nodeId); // 点击节点选中复选框
					
						var checkbarNodes = dtree.getCheckbarNodesParam("demoTree");
					});
				})
			})
		</script>
	</body>
</html>
